#!/bin/sh

if [ "$2" = "/" ]
then
	echo `/usr/local/nagios/libexec/check_nrpe -H $1 -c check_disk | awk 'NF<6 {printf $0;getline}1' | head -n 2| grep $2| awk '{print $5}' | sed 's/%//g'`
else
	echo `/usr/local/nagios/libexec/check_nrpe -H $1 -c check_disk | awk 'NF<6 {printf $0;getline}1' | grep $2| awk '{print $5}' | sed 's/%//g'`
fi
